package com.aier.classes.entity;

import static javax.persistence.GenerationType.IDENTITY;

import java.sql.Timestamp;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Classes entity. @author MyEclipse Persistence Tools
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "homework", catalog = "abc")
public class Homework implements java.io.Serializable {

    // 主键
    private Long hid;
    // 班级id
    private Long cid;
    // 教师id
    private Long tid;
    private String title;
    // 作业内容
    private String content;
    // 作业图片
    private String img;
    // 发布作业时间
    private Timestamp cdate;
    // 作业发送的人数
    private Integer count;
    // 已阅人数
    private Integer reading;
    
    // 教师姓名
    private String tname;
    // 评论列表
    private List<HomeworkComment> hcList;
    // 头像
    private String headimg;
    
    // 短信发送成功和失败的用户名
    private String successStr;
    private String failStr;
    
    /** default constructor */
    public Homework() {
    }
    
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "hid", unique = true, nullable = false)
    public Long getHid() {
        return hid;
    }

    public void setHid(Long hid) {
        this.hid = hid;
    }

    @Column(name = "cid")
    public Long getCid() {
        return cid;
    }

    public void setCid(Long cid) {
        this.cid = cid;
    }

    @Column(name = "tid")
    public Long getTid() {
        return tid;
    }

    public void setTid(Long tid) {
        this.tid = tid;
    }

    @Column(name = "cdate")
    public Timestamp getCdate() {
        return cdate;
    }

    public void setCdate(Timestamp cdate) {
        this.cdate = cdate;
    }

    @Column(name = "content")
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
    @Column(name = "img")
    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public String getHeadimg() {
        return headimg;
    }

    public void setHeadimg(String headimg) {
        this.headimg = headimg;
    }

    public String getTname() {
        return tname;
    }

    public void setTname(String tname) {
        this.tname = tname;
    }

    public List<HomeworkComment> getHcList() {
        return hcList;
    }

    public void setHcList(List<HomeworkComment> hcList) {
        this.hcList = hcList;
    }

    public String getSuccessStr() {
        return successStr;
    }

    public void setSuccessStr(String successStr) {
        this.successStr = successStr;
    }

    public String getFailStr() {
        return failStr;
    }

    public void setFailStr(String failStr) {
        this.failStr = failStr;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Integer getReading() {
        return reading;
    }

    public void setReading(Integer reading) {
        this.reading = reading;
    }
    

}